//调用接口配置文件
import { request } from 'config/request'
// 定义接口
// 获取省市区
export async function queryAllAddress(params) {
	return request({
		url: 'admin/address/queryAllAddress',
		method: 'GET',
		data: params,
	});
};
//修改
export async function update (params) {
  return request({
    url: `jfsc/admin/gift/update`,
    method: 'POST',
    headers: {
      'Content-type': 'application/json'
    },
    data: params
  })
}

//新增
export async function create (params) {
  return request({
    url: `jfsc/admin/gift/create`,
    method: 'POST',
    headers: {
      'Content-type': 'application/json'
    },
    data: params
  })
}

export async function getDetail (params) {
  return request({
    url: 'jfsc/admin/gift/detail',
    method: 'GET',
    data: params,
  })
}

//获取区域数据
export async function getRegion(params) {
	return request({
		url: 'admin/product/present/getRegion',
		method: 'POST',
		data: params 
	});
};
// 获取商家信息
export async function getMerchant(params) {
	return request({
		url: 'jfsc/admin/merchant/list',
		method: 'POST',
		data: params 
	});
};

// 获取商品类型
export async function getMerchandise(params) {
	return request({
		url: 'jfsc/admin/merchandise/list',
		method: 'POST',
		data: params 
	});
};